package org.linys.service.sale;

import java.util.List;

import org.linys.dao.sale.SaleDetailDAO;
import org.linys.model.sale.SaleDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SaleDetailServ {
	private SaleDetailDAO saleDetailDAO;

	public SaleDetailDAO getSaleDetailDAO() {
		return saleDetailDAO;
	}
	@Autowired
	public void setSaleDetailDAO(SaleDetailDAO saleDetailDAO) {
		this.saleDetailDAO = saleDetailDAO;
	}
	
	public int save(SaleDetail saleDetail) {
		return saleDetailDAO.save(saleDetail);
	}
	public int saveTemp(SaleDetail saleDetail) {
		return saleDetailDAO.save(saleDetail);
	}
	public List<SaleDetail> getBySaleID(Integer saleID) {
		return saleDetailDAO.getBySaleID(saleID);
	}
	

}
